
@extends('admin.layouts.app')
@section('title','会员列表')
@section('headerCss')
    @parent
    <link href="{{ asset('admin/assets/css/codemirror.css') }}" rel="stylesheet">
@stop
@section('headerJs')
    @parent
    <script src="{{ asset('admin/assets/js/jquery.min.js') }}"></script>
    <script src="{{ asset('admin/Widget/layui/lib/layui/layui.js') }}" charset="utf-8"></script>
    <script src="{{ asset('admin/Widget/layui/js/xadmin.js') }}" charset="utf-8"></script>
    <script type="text/javascript">
        if("ontouchend" in document) document.write("<script src='{{ asset('admin/assets/js/jquery.mobile.custom.min.js') }}'>"+"<"+"/script>");
    </script>
    <script src="{{ asset('admin/assets/js/bootstrap.min.js') }}"></script>
    <script src="{{ asset('admin/assets/js/typeahead-bs2.min.js') }}"></script>
    <!-- page specific plugin scripts -->
    <script src="{{ asset('admin/assets/js/jquery-2.0.3.min.js') }}"></script>
    <script src="{{ asset('admin/js/jquery-3.3.1.min.js') }}"></script>
    <script src="{{ asset('admin/assets/js/jquery.dataTables.min.js') }}"></script>
    <script src="{{ asset('admin/assets/js/jquery.dataTables.bootstrap.js') }}"></script>
    <script type="text/javascript" src="{{ asset('admin/js/H-ui.js') }}"></script>
    <script type="text/javascript" src="{{ asset('admin/js/H-ui.admin.js') }}"></script>
@stop
@section('content')
    @yield('extends')
    <div class="page-content clearfix">
        <div id="Member_Ratings">
            <div class="d_Confirm_Order_style">
                <div class="table_menu_list">
                    {!! $dataTable->table() !!}
                </div>
            </div>
        </div>
    </div>
@stop

@section('js')

    {!! $dataTable->scripts() !!}
    <script>
        function del(obj,url,route,model){
            layer.confirm('确认要删除吗？',function(index){
                $.ajaxSetup({
                    headers: { 'X-CSRF-TOKEN' : '{{ csrf_token() }}' }
                });
                $.ajax({
                    type : 'delete',
                    url : url,
                    datatype : 'json',
                    beforeSend : function () {
                        index = layer.load(1, {shade: [0.6, '#393D49']});
                    },
                    success: function(response, status, xhr) {
                        switch (response.status) {
                            case 200 :
                                layer.msg(response.msg, {
                                    icon: 1,
                                    time: 1000 //2秒关闭（如果不配置，默认是3秒）
                                }, function(){
                                    var index = parent.layer.getFrameIndex(window.name);
                                    if(model == 'parent') {
                                        parent.layer.close(index);
                                        parent.location.href = route;
                                    } else if (model == 'self'){
                                        layer.close(index);
                                        location.href = route;
                                    }
                                });
                                break;
                            case '422' :
                                if (model == 'parent') {
                                    parent.layer.close(index);
                                    layer.msg(response.msg, {icon: 5,shade: [0.6, '#393D49'],time:2000});
                                } else if (model == 'self') {
                                    layer.close(index);
                                    layer.msg(response.msg, {icon: 5,shade: [0.6, '#393D49'],time:2000});
                                }
                                break;
                        }
                    }
                });

            });
        }
    </script>
    @yield('my-js')
@stop














